package cn.wolfcode.luowowo.common.util;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by admin on 2019/8/7.
 */
@Setter
@Getter
public class AjaxResult {
    private boolean success = true;
    private String msg;

    private int code;

    private Object data;

    private List<String> takeoffPortNames = new ArrayList<>();
    private List<String> landingPortNames = new ArrayList<>();
    private List<String> airlineNames = new ArrayList<>();
    private List<String> planeTypes = new ArrayList<>();

    public AjaxResult() {
    }

    public AjaxResult(boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    public AjaxResult getData(Object data) {
        this.data = data;
        return this;
    }

    public AjaxResult(boolean success) {
        this.success = success;
    }

    public static final AjaxResult SUCCESS = new AjaxResult();
    public static final AjaxResult FALSE = new AjaxResult(false);
}
